package com.soap.webservice.service;

import com.soap.webservice.entities.Order;
import lombok.extern.slf4j.Slf4j;
import org.apache.cxf.interceptor.InInterceptors;

import javax.jws.WebService;
import javax.xml.ws.BindingType;
import javax.xml.ws.soap.SOAPBinding;

/**
 * @author lzy
 * @version v1.0
 * Create DateTime: 2019/4/17 22:37
 */
@Slf4j
@WebService
@BindingType(SOAPBinding.SOAP12HTTP_BINDING)
@InInterceptors(interceptors = {"com.soap.webservice.interceptors.CheckSoapHeader"})
public class OrderServiceImpl implements OrderService {
    public OrderServiceImpl() {
        log.info("init service...");
    }

    @Override
    public Order getOrderById(int id) {
        log.info("service getOrderById()");
        return new Order(123, "wj", 34.2);
    }
}
